import java.util.*;

public class problem2 {
	
	static public void main(String[] p) {
		int f[] = new int[40]; 
		f[0]=0; f[1]=1; f[2]=1;
		int i=0,s=0,j;
		for(i=2; i<40; i++)
			f[i]=f[i-2]+f[i-1];
		for(i=0; i<40; i+=1)
			if(f[i]%2==0) {
				System.out.println("even:"+f[i]);
				if(f[i]<=4000000)
					s+=f[i];
			}
		System.out.println(s);
	}
}
